<?php 

	

	echo '<div class="attack-page">';
	$html = '';
	$html = '<div class="general-details">';
	$html .= '<span class="inline left">Battlefield</span>';
	$html .= '<span class="inline left">'.$this->defenderName.' land</span>';
	$html .= '<span class="inline left">Time</span>';
	$html .= '<span class="inline left nob">'.$this->date.'</span>';
	$html .= '</div>';

	$html .= '<div class="left-side">';
		$html .= '<div class="player-details">';
			$html .= '<p class="inline left"><span>'. $this->offenderName.'</span> ('. $this->offenderRace.' - Level '.$this->offenderLevel.')</p>';
		$html .= '</div>';
	$html .= '</div>';

	$html .= '<div class="right-side">';
		$html .= '<div class="player-details">';
			$html .= '<p class="inline left"><span>'. $this->defenderName.'</span> ('. $this->defenderRace.' - Level '.$this->defenderLevel.')</p>';
		$html .= '</div>';	
	$html .= '</div>';



	if ( isset($this->winnerAndGold) )
	{	
		$html .= '<div class="combat-details">';
			$html .= '<div class="attacker-stats">';
				$html .= '<div class="table-head">';	
				$html .= '<span class="inline left"></span>';
				$html .= '<span class="inline left">Offense</span>';
				$html .= '<span class="inline left">Defense</span>';
				$html .= '<span class="inline nob left">Damage</span>';	
				$html .= '</div>';

				$html .= '<div class="table-row">';
				$html .= '<span class="inline left">Stats</span>';		
				$html .= '<span class="inline left">'. $this->offenderOffense .'</span>';
				$html .= '<span class="inline left">'. $this->offenderDefense .'</span>';
				$html .= '<span class="inline nob left">'. $this->offenderDamage .'</span>';	
				$html .= '</div>';

				$html .= '<div class="table-row">';
				$html .= '<span class="info inline left">Leadership bonus</span>';		
					$html .= '<span class="bonus inline left nob"><img src="../../../../public/images/leadership-bonus.png" />';
						$html .= '<span class="inline left nob">18%</span>';
					$html .= '</span>';	
				$html .= '</div>';
			$html .= '</div>';

			$html .= '<div class="defender-stats">';			
				$html .= '<div class="table-head">';	
				$html .= '<span class="inline left"></span>';
				$html .= '<span class="inline left">Offense</span>';
				$html .= '<span class="inline left">Defense</span>';
				$html .= '<span class="inline nob left">Damage</span>';	
				$html .= '</div>';

				$html .= '<div class="table-row">';
				$html .= '<span class="inline left">Stats</span>';		
				$html .= '<span class="inline left">'. $this->defenderOffense .'</span>';
				$html .= '<span class="inline left">'. $this->defenderDefense .'</span>';
				$html .= '<span class="inline nob left">'. $this->defenderDamage .'</span>';
				$html .= '</div>';

				$html .= '<div class="table-row">';
				$html .= '<span class="info inline left">Leadership bonus</span>';		
				$html .= '<span class="bonus inline left nob"><img src="../../../../public/images/leadership-bonus.png" />';
						$html .= '<span class="inline left nob">14.5%</span>';
					$html .= '</span>';		
				$html .= '</div>';
			$html .= '</div>';
		$html .= '</div>';// end combat details

		$html .= '<div class="table-head-result">';
				$html .= '<span class="inline left">Result</span>';
				$html .= '<span class="info inline left nob">'. $this->winnerAndGold .'</span>';
		$html .= '</div>';	
		
		$html .= '<div class="table-head-result">';
				$html .= '<span class="inline left">Offender hero bonus</span>';
				$html .= '<span class="info inline left nob">'. $this->a_xp.' experience points</span>';
		$html .= '</div>';	
		
		$html .= '<div class="table-head-result">';
				$html .= '<span class="inline left">Defender hero bonus</span>';
				$html .= '<span class="info inline left nob">'. $this->d_xp .' experience points</span>';
		$html .= '</div>';	
			
		$html .= '<div class="table-row-result">';		
				$html .= '<span class="inline left border-right-dotted">Offender Units lost</span>';
				$html .= '<span class="info inline left">'. $this->offenderTotalUnitsLost .'</span>';
				$html .= '<span class="inline left border-right-dotted">Power lost</span>';
				$html .= '<span class="info inline left">'. $this->offenderTotalPowerLost .'</span>';
				$html .= '<span class="inline left border-right-dotted">Units lost</span>';
				$html .= '<div class="units inline left">'; //$this->offenderTotalUnitsLost;
					$html .='<span class="unit lvl1">' . $this->a_1 . '</span>';
					$html .='<span class="unit lvl2">' . $this->a_2 . '</span>';
					$html .='<span class="unit lvl3">' . $this->a_3 . '</span>';
					$html .='<span class="unit lvl4">' . $this->a_4 . '</span>';
					$html .='<span class="unit lvl5 nob">' . $this->a_5 . '</span>';
				$html .= '</div>';
		$html .= '</div>';

		$html .= '<div class="table-row-result margin-bottom-20">';		
				$html .= '<span class="inline left border-right-dotted">Defender Units lost</span>';
				$html .= '<span class="info inline left">'. $this->defenderTotalUnitsLost .'</span>';
				$html .= '<span class="inline left border-right-dotted">Power lost</span>';
				$html .= '<span class="info inline left">'. $this->defenderTotalPowerLost .'</span>';
				$html .= '<span class="inline left border-right-dotted">Units lost</span>';
				$html .= '<div class="units inline left">';
					$html .='<span class="unit lvl1">' . $this->d_1 . '</span>';
					$html .='<span class="unit lvl2">' . $this->d_2 . '</span>';
					$html .='<span class="unit lvl3">' . $this->d_3 . '</span>';
					$html .='<span class="unit lvl4">' . $this->d_4 . '</span>';
					$html .='<span class="unit lvl5 nob">' . $this->d_5 . '</span>';
				$html .= '</div>';
		$html .= '</div>';
		//echo $this->winnerAndGold .'<br/>';
	}	

	$html .= '<div class="left-side">';
		
		//table head - general information
		$html .= '<div class="table-head">';	
			$html .= '<span class="inline left"></span>';
			$html .= '<span class="inline left">Army size</span>';
			$html .= '<span class="inline left">Power</span>';
			$html .= '<span class="inline nob left">Coins</span>';	
		$html .= '</div>';
		//end table head

		$html .= '<div class="table-row">';
			$html .= '<span class="inline left">Info</span>';		
			$html .= '<span class="inline left">'. $this->offenderTotalUnits .'</span>';
			$html .= '<span class="inline left">'.round($this->offenderPower) .'</span>';
			$html .= '<span class="inline nob left">'. $this->offenderWealth .'</span>';		
		$html .= '</div>';
	$html .= '</div>'; //left-side
	
	$html .= '<div class="right-side">';
	
		//table head - general information
		$html .= '<div class="table-head">';	
			$html .= '<span class="inline left"></span>';
			$html .= '<span class="inline left">Army size</span>';
			$html .= '<span class="inline left">Power</span>';
			$html .= '<span class="inline nob left">Coins</span>';	
		$html .= '</div>';

		$html .= '<div class="table-row">';
			$html .= '<span class="inline left">Info</span>';		
			$html .= '<span class="inline left">'. $this->defenderTotalUnits .'</span>';
			$html .= '<span class="inline left">'.round($this->defenderPower) .'</span>';
			$html .= '<span class="inline nob left">'. $this->defenderWealth .'</span>';	
		$html .= '</div>';		$html .= '</div>'; //right-side
	echo $html;

  	echo '<div class="raids">';
		echo $this->attackForm;
	echo '</div>';
	echo '</div>'; //attack-page